package com.giser.testapp.lib.Tool;

import android.content.Context;
import android.widget.Toast;

/**
 * Created by Lss on 2017/11/29.
 */

public class ToastUtil {
    private static Toast toast;
    public static void showShort(Context context, String message) {
        if (null == toast) {
            toast = Toast.makeText(context, message, Toast.LENGTH_SHORT);
        } else {
            toast.setText(message);
        }
        toast.show();
    }
    public static void showLong(Context context, String message) {
        if (null == toast) {
            toast = Toast.makeText(context, message, Toast.LENGTH_LONG);
        } else {
            toast.setText(message);
        }
        toast.show();
    }
}
